//
//  BKMain_TitleCell.m
//  bestkeep
//
//  Created by utouu666 on 17/2/14.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import "BKMain_TitleCell.h"
#import "BKMainCommon.h"
#import "UIButton+XN.h"

@interface BKMain_TitleCell()

@property(nonatomic,strong)UILabel *titleLabel;

@end

@implementation BKMain_TitleCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self initialize];
    }
    return self;
}

-(void)initialize{
        
    UIButton *recommendBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [recommendBtn setTitle:@"为你推荐" forState:UIControlStateNormal];
    [recommendBtn setTitleColor:RGB(68, 68, 68) forState:UIControlStateNormal];
    recommendBtn.titleLabel.font = [Common systemFontOfSize:15];
    [recommendBtn setImage:[UIImage imageNamed:@"BKMain_icon recommend"] forState:UIControlStateNormal];
    [self addSubview:recommendBtn];
    [recommendBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self.mas_centerX);
        make.centerY.mas_equalTo(self.mas_centerY);
    }];
    recommendBtn.userInteractionEnabled = NO;
    [recommendBtn layoutButtonWithEdgeInsetsStyle:XNButtonEdgeInsetsStyleLeft imageTitleSpace:9];
    UIView *lineView = [[UIView alloc]init];
    lineView.backgroundColor = RGB(218, 218, 218);
    [self addSubview:lineView];
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).offset(0);
        make.right.mas_equalTo(self.mas_right).offset(0);
        make.height.mas_offset(@(0.5));
        make.bottom.mas_equalTo(self.mas_bottom).offset(-0.5);
    }];

}


+(CGSize)calculateSize:(id)data{
    
    return CGSizeMake(SCREENWIDTH, SCREENWIDTH/375*40);
}
- (void)fillData:(id)data{
    if (!data) {
        return;
    }
    
}


@end
